/* See the file "LICENSE" for the full license governing this code. */
package com.plugandcare.graphyty.gui;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

import com.plugandcare.graphyty.R;

/**
 * Main activity of GraphyTy holding all tabs.
 * 
 * @author Timo Tischler
 * @author Steven Mohr
 * 
 */
public class Main extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Resources res = getResources();
        TabHost tabHost = getTabHost();
        TabHost.TabSpec spec;
        Intent intent;

        intent = new Intent().setClass(this, BloodPressureActivity.class);
        spec = tabHost.newTabSpec("blood_pressure").setIndicator(getString(R.string.blood_pressure)).setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, BloodGlucoseActivity.class);
        spec = tabHost.newTabSpec("blood_glucose").setIndicator(getString(R.string.blood_glucose)).setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, BodyWeightActivity.class);
        spec = tabHost.newTabSpec("weight").setIndicator(getString(R.string.body_weight)).setContent(intent);
        tabHost.addTab(spec);

    }
}
